<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibQQt: R:/Develop/a0-develop/LibQQt/src/exquisite/qrcode/qqtcustomqrencodewidget.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibQQt
   &#160;<span id="projectnumber">v3.1</span>
   </div>
   <div id="projectbrief">开源、跨平台Qt应用程序框架中间件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_14bafaf81b4d5a7e53bf81c33f47f3f2.html">exquisite</a></li><li class="navelem"><a class="el" href="dir_4653d68db7f6be9ae8b828dd23d15f2b.html">qrcode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">qqtcustomqrencodewidget.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef QQTCUSTOMQRENCODEWIDGET_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define QQTCUSTOMQRENCODEWIDGET_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;QResizeEvent&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;QPainter&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;QSize&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;QWidget&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;QPaintEvent&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;qrencode.h&quot;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;qqt-local.h&quot;</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="class_q_qt_custom_qr_encode_widget.html">   26</a></span>&#160;<span class="keyword">class </span>QQTSHARED_EXPORT <a class="code" href="class_q_qt_custom_qr_encode_widget.html">QQtCustomQrEncodeWidget</a> : <span class="keyword">public</span> QWidget</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    Q_OBJECT</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="class_q_qt_custom_qr_encode_widget.html">QQtCustomQrEncodeWidget</a>(QWidget* parent = 0);</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_q_qt_custom_qr_encode_widget.html#a57caf10e5dda4bb3f138018d083071e6">   37</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="class_q_qt_custom_qr_encode_widget.html#a57caf10e5dda4bb3f138018d083071e6">QR_MODE</a></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        MODE_NUL = QR_MODE_NUL,</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        MODE_NUM = QR_MODE_NUM,</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        MODE_AN = QR_MODE_AN,</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        MODE_8 = QR_MODE_8,</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        MODE_KANJI = QR_MODE_KANJI,</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        MODE_STRUCTURE = QR_MODE_STRUCTURE,</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        MODE_ECI = QR_MODE_ECI,</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        MODE_FNC1FIRST = QR_MODE_FNC1FIRST,</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        MODE_FNC1SECOND = QR_MODE_FNC1SECOND</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    };</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_q_qt_custom_qr_encode_widget.html#a6107aaf68178d54d1274f0afc2ec310b">   53</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="class_q_qt_custom_qr_encode_widget.html#a6107aaf68178d54d1274f0afc2ec310b">QR_LEVEL</a></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        LEVEL_L = QR_ECLEVEL_L,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        LEVEL_M = QR_ECLEVEL_M,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        LEVEL_Q = QR_ECLEVEL_Q,</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        LEVEL_H = QR_ECLEVEL_H</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    };</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    QString getQrData() <span class="keyword">const</span>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">void</span> setQrData(<span class="keyword">const</span> QString&amp; value);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    QString getQrLogo() <span class="keyword">const</span>;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordtype">void</span> setQrLogo(<span class="keyword">const</span> QString&amp; value);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    QSize getQrSize() <span class="keyword">const</span>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordtype">void</span> setQrSize(<span class="keyword">const</span> QSize&amp; value);</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    QR_MODE getQrMode() <span class="keyword">const</span>;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordtype">void</span> setQrMode(<span class="keyword">const</span> QR_MODE&amp; value);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    QR_LEVEL getQrLevel() <span class="keyword">const</span>;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordtype">void</span> setQrLevel(<span class="keyword">const</span> QR_LEVEL&amp; value);</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordtype">bool</span> getQrCasesen() <span class="keyword">const</span>;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordtype">void</span> setQrCasesen(<span class="keywordtype">bool</span> value);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordtype">int</span> getQrMargin() <span class="keyword">const</span>;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordtype">void</span> setQrMargin(<span class="keywordtype">int</span> value);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    qreal getQrPercent() <span class="keyword">const</span>;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keywordtype">void</span> setQrPercent(<span class="keyword">const</span> qreal&amp; value);</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    QColor getQrForeground() <span class="keyword">const</span>;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordtype">void</span> setQrForeground(<span class="keyword">const</span> QColor&amp; value);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    QColor getQrBackground() <span class="keyword">const</span>;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">void</span> setQrBackground(<span class="keyword">const</span> QColor&amp; value);</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    QString getQrFilePath() <span class="keyword">const</span>;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keywordtype">void</span> setQrFilePath(<span class="keyword">const</span> QString&amp; value);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;signals:</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordtype">void</span> qrDataChanged(<span class="keyword">const</span> QString&amp; qrdata);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <span class="keywordtype">void</span> qrLogoChanged(<span class="keyword">const</span> QString&amp; qrlogo);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="keywordtype">void</span> qrSizeChanged(<span class="keyword">const</span> QSize&amp; qrsize);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keywordtype">void</span> qrModeChanged(QR_MODE qrmodel);</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordtype">void</span> qrLevelChanged(QR_LEVEL qrlevel);</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keywordtype">void</span> qrCasesenChanged(<span class="keywordtype">bool</span> qrcasesen);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="keywordtype">void</span> qrMarginChanged(<span class="keywordtype">int</span> qrmargin);</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="keywordtype">void</span> qrPercentChanged(qreal qrpercent);</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordtype">void</span> qrForegroundChanged(<span class="keyword">const</span> QColor&amp; qrfg);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keywordtype">void</span> qrBackgroundChanged(<span class="keyword">const</span> QColor&amp; qrbg);</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keywordtype">void</span> qrSaveFileChanged(<span class="keyword">const</span> QString&amp; qrfilepath);</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordtype">void</span> paintEvent(QPaintEvent* e);</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordtype">void</span> resizeEvent(QResizeEvent* e);</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="keywordtype">void</span> saveCurViewToFile();</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    QString qrData;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    QString qrLogo;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    QSize qrSize;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    QR_MODE qrMode;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    QR_LEVEL qrLevel;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keywordtype">bool</span> qrCasesen;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    <span class="keywordtype">int</span> qrMargin;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    qreal qrPercent;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    QColor qrForeground;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    QColor qrBackground;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    QString qrFilePath;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;};</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="preprocessor">#endif // QQTCUSTOMQRENCODEWIDGET_H</span></div><div class="ttc" id="class_q_qt_custom_qr_encode_widget_html"><div class="ttname"><a href="class_q_qt_custom_qr_encode_widget.html">QQtCustomQrEncodeWidget</a></div><div class="ttdoc">The QQtCustomQrEncodeWidget class 二维码生成组件 </div><div class="ttdef"><b>Definition:</b> qqtcustomqrencodewidget.h:26</div></div>
<div class="ttc" id="class_q_qt_custom_qr_encode_widget_html_a57caf10e5dda4bb3f138018d083071e6"><div class="ttname"><a href="class_q_qt_custom_qr_encode_widget.html#a57caf10e5dda4bb3f138018d083071e6">QQtCustomQrEncodeWidget::QR_MODE</a></div><div class="ttdeci">QR_MODE</div><div class="ttdoc">The QR_MODE enum 设置二维码的编码模式 </div><div class="ttdef"><b>Definition:</b> qqtcustomqrencodewidget.h:37</div></div>
<div class="ttc" id="class_q_qt_custom_qr_encode_widget_html_a6107aaf68178d54d1274f0afc2ec310b"><div class="ttname"><a href="class_q_qt_custom_qr_encode_widget.html#a6107aaf68178d54d1274f0afc2ec310b">QQtCustomQrEncodeWidget::QR_LEVEL</a></div><div class="ttdeci">QR_LEVEL</div><div class="ttdoc">The QR_LEVEL enum 设置二维码编码的识别质量的级别 </div><div class="ttdef"><b>Definition:</b> qqtcustomqrencodewidget.h:53</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
